package com.feng.oauth2.oauth.infrastructure;


import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;


/**
 * 2016/3/25
 * <p/>
 * 处理账号密码, 使用MD5加密
 *
 */
public abstract class PasswordHandler {
    private static final PasswordEncoder encoder = new BCryptPasswordEncoder();

    private PasswordHandler() {
    }


    public static String md5(String password) {

        return encoder.encode(password);
    }
}
